<?php
namespace app\mobile\model;

/**
 * Class Coupon
 * @package app\mobile\model     店铺代金券表
 */
class Coupon extends BaseModel
{
    /*
     * 店铺优惠券和用户领取的优惠券一对多
     */
    public function memberCoupon()
    {
        return $this->hasMany('MemberCoupon','coupon_id','id');
    }

    public function getActualPriceAttr($value)
    {
        return (int)$value;
    }
    public function getVirtualPriceAttr($value)
    {
        return (int)$value;
    }
}